package com.chain;

import com.chain.impl.CommonManager;
import com.chain.impl.GeneralManager;
import com.chain.impl.MajorManager;

public class Test {

	public static void main(String[] args) {
		Manager jingli = new CommonManager("经理");
		Manager zongjian = new MajorManager("总监");
		Manager zongjingli = new GeneralManager("总经理");

		jingli.setSuccessor(zongjian);
		zongjian.setSuccessor(zongjingli);

		Request request = new Request();
		request.setRequestType("请假");
		request.setNumber(1);
		request.setRequestContent("小菜请假");
		jingli.requestApplications(request);

		request = new Request();
		request.setRequestType("请假");
		request.setNumber(4);
		request.setRequestContent("小菜请假");
		jingli.requestApplications(request);

		request = new Request();
		request.setRequestType("加薪");
		request.setNumber(500);
		request.setRequestContent("小菜加薪");
		jingli.requestApplications(request);
	}

}
